package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the DETALLE_BLOQ database table.
 * 
 */
@Entity
@Table(name="DETALLE_BLOQ")
public class DetalleBloq implements Serializable {
	private static final long serialVersionUID = 1L;
	private DetalleBloqPK id;
	private String agntSync;
	private String numMotor;
	private String numSerie;
	private Date tsUltSync;
	private TaBloqPartida taBloqPartida;

    public DetalleBloq() {
    }


	@EmbeddedId
	public DetalleBloqPK getId() {
		return this.id;
	}

	public void setId(DetalleBloqPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="NUM_MOTOR", length=30)
	public String getNumMotor() {
		return this.numMotor;
	}

	public void setNumMotor(String numMotor) {
		this.numMotor = numMotor;
	}


	@Column(name="NUM_SERIE", length=30)
	public String getNumSerie() {
		return this.numSerie;
	}

	public void setNumSerie(String numSerie) {
		this.numSerie = numSerie;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to TaBloqPartida
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="ANO_TITU", referencedColumnName="ANO_TITU", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="AREA_REG_ID", referencedColumnName="AREA_REG_ID", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="NUM_PARTIDA", referencedColumnName="NUM_PARTIDA", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="NUM_TITU", referencedColumnName="NUM_TITU", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="OFIC_REG_ID", referencedColumnName="OFIC_REG_ID", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="REG_PUB_ID", referencedColumnName="REG_PUB_ID", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="SISTEMA_ID", referencedColumnName="SISTEMA_ID", nullable=false, insertable=false, updatable=false)
		})
	public TaBloqPartida getTaBloqPartida() {
		return this.taBloqPartida;
	}

	public void setTaBloqPartida(TaBloqPartida taBloqPartida) {
		this.taBloqPartida = taBloqPartida;
	}
	
}